Skip to content

Conversation

@Dalyl09
Copy link
Collaborator

@Dalyl09 Dalyl09 commented Feb 4, 2025

What Issue Does This PR Cover, If Any?

Resolves #9

What Changed? And Why Did It Change?

Capture d’écran 2025-02-04 à 11 46 06

How Has This Been Tested?

Rspec

Please Provide Screenshots

Capture d’écran 2025-02-04 à 11 46 06

Additional Comments

@Dalyl09 Dalyl09 force-pushed the user_management_interface branch 2 times, most recently from a77d532 to 5be6aac Compare February 4, 2025 11:01
@Oli0li Oli0li requested a review from seanmarcia February 4, 2025 12:30

<li class="sidebar-item ">
<a href="application-chat.html" class='sidebar-link'>
<a href="<%= users_path%>" class='sidebar-link'>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably use a link_to rather than an href... something like:

<%= link_to users_path, class: 'sidebar-link' do %>
  <i class="bi bi-people"></i>
  <span>Users</span>
<% end %>


<body>
<!-- Only for connexion and reset password not display sidebar -->
<% unless current_page?('/connexion') || current_page?('/reset_password') %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think /connexion isn't a rails convention.

<body>
<!-- Only for connexion and reset password not display sidebar -->
<% unless current_page?('/connexion') || current_page?('/reset_password') %>
<%= render "layouts/sidebar" %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have a different layout all together for the session stuff. Like a session layout session.html.erb that is going to be specific for the password/login/etc

root "home#index"
get "home/index", as: :home
resource :session
resources :passwords, param: :token
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like we shouldn't change these away from the rails defaults.

@@ -0,0 +1,123 @@
require "rails_helper"

# This spec was generated by rspec-rails when you ran the scaffold generator.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably remove all the comments.

end
end
end

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra space here can be removed

def new
@user = User.new
end
def edit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add space before this method

<div class="card">
<div class="card-body">

<i class="bi bi-plus"></i> <%= link_to "New User?",new_user_path, class:'btn btn-primary'%> </i>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want to do this like:

<%= link_to new_region_path, class: "btn btn-primary" do %>
  <i class="bi bi-plus"></i> Add New User
<% end %>

@Oli0li Oli0li requested a review from seanmarcia February 4, 2025 13:54
@Oli0li Oli0li force-pushed the user_management_interface branch from 676b7c2 to 0a2d2b3 Compare February 4, 2025 14:06
Dalyl Feddal and others added 12 commits February 4, 2025 14:10
…gn for session/new, session controler : layout -> mazer
This commit removes/adds spaces where needed, removes unnecessary comments
and changes <a> to link_to in the sidebar.

There are still some other <a> in the sidebar that I haven't changed yet
as other people are in the process of adding routes to these pages
(Topics and Languages).
@Oli0li Oli0li force-pushed the user_management_interface branch from 0a2d2b3 to 918e7b1 Compare February 4, 2025 14:15
As per Sean's suggested changes, I have removed the "connexion" and
"reset_password" routes to use the default Rails conventions.

I have also fixed indendation and added some tests for login and password
reset.
@Oli0li Oli0li force-pushed the user_management_interface branch from 918e7b1 to c2b6925 Compare February 4, 2025 14:20
@seanmarcia seanmarcia merged commit 80a1cef into main Feb 4, 2025
4 checks passed
@dmitrytrager dmitrytrager deleted the user_management_interface branch February 13, 2025 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User Management Interface

5 participants